﻿Public Class GroupMuduleButton

    Public Event OnSelectItem As EventHandler
    ' Event OnSelectItem(ByVal UserName As String)

    Private _select As Boolean = False
    Public Property Selected() As Boolean
        Get
            Return _select
        End Get
        Set(ByVal value As Boolean)
            _select = value
            If value Then
                'btn.ImageIndex = 1
                'btn.Appearance.
            Else
                'btn.ImageIndex = 0
            End If
        End Set
    End Property
    Private _caption As String
    Public Property Caption() As String
        Get
            Return _caption
        End Get
        Set(ByVal value As String)
            _caption = value
            btn.Text = _caption
        End Set
    End Property

    Private Sub btn_Click(sender As System.Object, e As System.EventArgs) Handles btn.Click
        RaiseEvent OnSelectItem(Me, e)
    End Sub
End Class
